#include "stdafx.h"
#include "win_path.h"

_SSL_BEGIN
_SSWINOSL_BEGIN

tstring path_combine(const tstring &path1, const tstring &path2)
{
	tstring ret;
	if(path1.length() > 0)
	{
		ret = path1;
		if(path1[path1.length()-1] != _T('\\') && path1[path1.length()-1] != _T('/'))
			ret += _T("\\");
	}
	if(path2.length() > 0)
	{
		if(path2[0] == _T('\\') || path2[0] == _T('/'))
			ret += path2.substr(1);
		else
			ret += path2;
	}
	return ret;
}

_SSWINOSL_END
_SSL_END
